

import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/stm/swstinputpassengerwork/page',
    method: 'get',
    params: query
  })
}

export function exportExcel(query) {
  return request({
    url: '/stm/swstconductoradvancepayment/export',
    method: 'get',
    params: query,
    responseType: 'arraybuffer'
  })
}
export function addObj(obj) {
  return request({
    url: '/stm/swstinputpassengerwork',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/stm/swstinputpassengerwork/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/stm/swstinputpassengerwork/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/stm/swstinputpassengerwork',
    method: 'put',
    data: obj
  })
}

export function submit(obj) {
  return request({
    url: '/stm/swstinputpassengerwork/submit',
    method: 'post',
    data: obj
  })
}

//查看乘客事务数据录入历史记录
export function queryPastRecords(param){
  return request({
    url: '/stm/swstinputpassengerwork/getLogById/'+param.id,
    method: 'get'
  })
}
